package com.wlsk.license.common.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 包车牌状态
 */
public enum RePrintStatusEnum implements BaseEnum<RePrintStatusEnum, Integer> {

    NOT_RECORDED(0, "未补录"),

    SYSTEM_REPRINT_FAILED(1, "系统补录失败"),

    SYSTEM_REPRINT_SUCCESS(2, "系统补录成功"),

    MANUAL_REPRINT_FAILED(3, "人工补录失败"),

    MANUAL_REPRINT_SUCCESS(4, "人工补录成功");


    private final Integer code;

    private final String description;

    private static Map<Integer, RePrintStatusEnum> valueMap = new HashMap<>();

    RePrintStatusEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

    static {
        for (RePrintStatusEnum e : RePrintStatusEnum.values()) {
            valueMap.put(e.code, e);
        }
    }

    public static RePrintStatusEnum get(Integer value) {
        return valueMap.get(value);
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getDescription() {
        return description;
    }

    @Override
    public RePrintStatusEnum getByCode(Integer code) {
        return valueMap.get(code);
    }
}
